fix test_cargo_freshness
authorAleksey Kladov <aleksey.kladov@gmail.com>
Fri, 20 May 2016 13:54:01 +0000 (16:54 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Fri, 20 May 2016 13:54:01 +0000 (16:54 +0300)
tests/test_cargo_freshness.rs

index 7e57a3f8a4fb2e1ffa4db795566fd5eb4cfaefc3..5a74a9b714f9f7399c9e0843c167d25abbf0f1c5 100644 (file)
@@ -31,7 +31,7 @@ test!(modifying_and_moving {
     p.root().join("target").move_into_the_past().unwrap();
 
     File::create(&p.root().join("src/a.rs")).unwrap()
-         .write_all(b"fn main() {}").unwrap();
+         .write_all(b"#[allow(unused)]fn main() {}").unwrap();
     assert_that(p.cargo("build"),
                 execs().with_status(0).with_stderr(format!("\
 [COMPILING] foo v0.0.1 ({dir})
@@ -73,12 +73,11 @@ test!(modify_only_some_files {
     let bin = p.root().join("src/b.rs");
 
     File::create(&lib).unwrap().write_all(b"invalid rust code").unwrap();
-    File::create(&bin).unwrap().write_all(b"fn foo() {}").unwrap();
+    File::create(&bin).unwrap().write_all(b"#[allow(unused)]fn foo() {}").unwrap();
     lib.move_into_the_past().unwrap();
 
     // Make sure the binary is rebuilt, not the lib
-    assert_that(p.cargo("build")
-                 .env("RUST_LOG", "cargo::ops::cargo_rustc::fingerprint"),
+    assert_that(p.cargo("build"),
                 execs().with_status(0).with_stderr(format!("\
 [COMPILING] foo v0.0.1 ({dir})
 ", dir = path2url(p.root()))));